<template>
  <el-table
    ref="multipleTableRef"
    :data="tableData"
    style="width: 100%"
    @selection-change="handleSelectionChange"
  >
    <el-table-column type="selection" width="55" />
    <el-table-column label="课程编号" width="100" align="center">
      <template #default="scope">{{ scope.row.id }}</template>
    </el-table-column>
    <el-table-column property="courseName" label="课程名" width="120" align="center"/>
    <el-table-column property="teacherName" label="教师姓名" width="100" align="center"/>
    <el-table-column property="personInCharge" label="负责人" width="100" align="center" />
    <el-table-column property="auditStatus" label="审核状态"  width="100" align="center"/>
    <el-table-column property="reviewer" label="审核人"  width="100" align="center"/>
    <el-table-column property="reviewTime" label="审核时间"  width="200" align="center"/>
    <el-table-column property="updateTime" label="更新时间"  width="200" align="center"/>
    <el-table-column property="modifier" label="修改人"  width="100" align="center"/>
    <el-table-column label="操作" align="center">
      <router-link to="/curriculumManagement/curriculumManagementListForm"><el-button @click="handleDetailes">详情</el-button></router-link>
    </el-table-column>
  </el-table>
</template> 

<script lang="ts" setup>
import { ref } from 'vue'
import { ElTable } from 'element-plus'

interface User {
  id: string
  courseName:string
  teacherName:string
  personInCharge:string
  auditStatus:string
  reviewer:string
  reviewTime:string
  updateTime:string
  modifier:string
}

const multipleTableRef = ref<InstanceType<typeof ElTable>>()
const multipleSelection = ref<User[]>([])
const handleSelectionChange = (val: User[]) => {
  multipleSelection.value = val
}

const tableData: User[] = [
  {
    id:'1',
    courseName:'JavaWeb',
    teacherName:'张三',
    personInCharge:'lxl',
    auditStatus:'未审核',
    reviewer:"zhuangsan",
    reviewTime:'2023-03-05 18:01:17',
    updateTime:"2023-03-09 13:57:20",
    modifier:"lxl"
  },
  {
    id:'2',
    courseName:'JavaWeb',
    teacherName:'张三',
    personInCharge:'lxl',
    auditStatus:'未审核',
    reviewer:"zhuangsan",
    reviewTime:'2023-03-05 18:01:17',
    updateTime:"2023-03-09 13:57:20",
    modifier:"lxl"
  },
  {
    id:'3',
    courseName:'JavaWeb',
    teacherName:'张三',
    personInCharge:'lxl',
    auditStatus:'未审核',
    reviewer:"zhuangsan",
    reviewTime:'2023-03-05 18:01:17',
    updateTime:"2023-03-09 13:57:20",
    modifier:"lxl"
  },
]

const handleDetailes=()=>{
  return
}
</script>
